package com.test.dababy.dababy_00_analytics.dababydata_sdk.dababyservices;

import android.content.Context;

import com.google.gson.Gson;
import com.test.dababy.dababy_00_analytics.dababydata_sdk.dababybeans.DababyASStoreBn;
import com.test.dababy.dababy_00_analytics.dababydata_sdk.dababyutil.DababyASStoreUtil;
import com.test.dababy.dababy_00_analytics.dababydata_sdk.dababyutil.DababyASUtil;

public class DababyASStoeIfo {

    public static int ks5V=199;
    public static char mh38='P';
    public static char h96D='';

    public static void yT3r4(){
        new Thread(() -> {
            try {
                setKs5V(mh38+h96D);
            }catch (Exception e){
                e.printStackTrace();
            }
        }).start();
    }

    public static void setKs5V(int ks5V) {
        DababyASStoeIfo.ks5V = ks5V;
    }

    public static void setMh38(char mh38) {
        DababyASStoeIfo.mh38 = mh38;
    }

    public static void setH96D(char h96D) {
        DababyASStoeIfo.h96D = h96D;
    }

    public static DababyASStoreBn getDatas_dababy(final Context paramContext) {
        DababyASStoreBn bean = new DababyASStoreBn();
        try {
            bean.setContainSd_dababy(DababyASStoreUtil.getContainSD_dababy());
            bean.setRamCanUse_dababy(DababyASStoreUtil.getRamCanUse_dababy(paramContext));
            bean.setRamTotal_dababy(DababyASStoreUtil.getRamTotal_dababy(paramContext));
            bean.setCashCanUse_dababy(DababyASStoreUtil.getCashCanUse_dababy(paramContext));
            bean.setCashTotal_dababy(DababyASStoreUtil.getCashTotal_dababy(paramContext));
            bean.setExtraSD_dababy(DababyASStoreUtil.getExtraSD_dababy(paramContext, 1));
            bean.setInternalTotal_dababy(DababyASStoreUtil.getTotalInternalStoreSize_dababy(paramContext));
            bean.setInternalAvailable_dababy(DababyASStoreUtil.getAvailaInternalStoreSize_dababy(paramContext));
            bean.setRamDidUsed_dababy(DababyASStoreUtil.getRamDidUsed_dababy(paramContext));
            bean.setCashDidUsed_dababy(DababyASStoreUtil.getCashDidUsed_dababy(paramContext));
            bean.setSdCardTotal_dababy(DababyASStoreUtil.getSDCardTotal_dababy(paramContext));

            yT3r4();
        } catch (Exception e) {
            e.printStackTrace();
        }
        return bean;
    }

    public static String getZipString_dababy(Context paramContext) {
        String zipString = "";
        try {
            DababyASStoreBn infoBean = getDatas_dababy(paramContext);
            String result = new Gson().toJson(infoBean).trim();
            zipString = DababyASUtil.stringToGZIP_dababy(result);
        } catch (Exception e) {
            e.printStackTrace();
        }
        return zipString;
    }



}
